<?php

namespace App\Api\Logic;

use App\Api\Logic\Validate\TestValidate;

class TestLogic extends BaseLogic
{
    /**
     * @return TestValidate
     * author:mac
     * desc:获取验证器
     * created_at: {2020/10/16}----10:25 上午
     */
    private function getValidate():TestValidate{
        return  new TestValidate();
    }

    /**
     * @param array $params
     * author:mac
     * desc:登录的
     * created_at: {2020/10/16}----10:25 上午
     * @throws SysExceptions
     */
    public function login($params = []){
        $validate = $this->getValidate();
        if(!$validate->scene('login')->check($params)){
            //var_dump($validate->getError());
            $this->error($validate->getError());
        }
    }
}
